import Vue from 'vue'
import Router from 'vue-router'
const  index = ()=> import('components/index');
const  goods = () => import('components/goods');
const  classify = ()=> import("components/classify");
const  setting = ()=> import("components/setting");
const  settingAdd = ()=> import("components/setting-add");
const  settingEdit = ()=> import("components/setting-edit");
const  goodsListPage = ()=> import("components/goodsListPage");

Vue.use(Router);
export default new Router({
  routes: [
    {
      path: '/',
      component: index,
      meta:{
        keepAlive:true
      }
    },{
      path:"/goods/:id",
      component:goods,
      meta:{
        keepAlive:false
      }
    },{
      path:'/classify/:id',
      component:classify,
      meta:{
        keepAlive:true
      }
    },{
      path:"/setting",
      component:setting,
      meta:{
        keepAlive:true
      },
    },{
      path:'/setting/add',
      component:settingAdd,
      meta:{
        keepAlive:false
      }
    },{
      path:"/setting/edit",
      component:settingEdit,
      meta:{
        keepAlive:false
      }
    },{
      path:"/goodsList/:list",
      component:goodsListPage,
      meta:{
        keepAlive:true
      }
    }
  ]
})
